package ua.com.abakumov.android.prostopleer.dialogs

import android.app.{Activity, Dialog}
import android.view.{View, Window}
import ua.com.abakumov.android.R
import android.widget.Button

import ua.com.abakumov.android.prostopleer.util.Functions._
/**
 * DownloadProgressDialog

 * @author alexander-abakumov
 *         Date: 24.10.12
 */
class DownloadProgressDialog(activity: Activity) {

    def show() {
        val dialog = new Dialog(activity)
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE)
        dialog.setContentView(R.layout.download_progress_dialog)

        dialog.findViewById(R.id.closeButton).asInstanceOf[Button].
                setOnClickListener((view: View) => {
            dialog.dismiss()
        })

        dialog.show()
    }

}